var MongoClient = require('mongodb').MongoClient;
var assert = require('assert');

//Connect URL
var url = "mongodb://localhost:27017/data";

function connect(){
    //use connet method to connet to the server
    MongoClient.connect(url,function(err,db){
       assert.equal(null,err);
       console.log("Connected correctly to server .");

       db.close();
    });
}

exports.connect = connect;
